/*
 * Copyright (C) 2012 Vinu K.N
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.domainmath.gui.pacakges.db;

import java.awt.Desktop;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultListModel;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.domainmath.gui.MainFrame;
import org.domainmath.gui.about.AboutDlg;

public class DataBaseFrame extends javax.swing.JFrame {
    private final DefaultListModel listModel;
    private JFileChooser fc;
     public  java.net.URL imgURL = getClass().getResource("resources/DomainMath.png");
    public   Image icon = Toolkit.getDefaultToolkit().getImage(imgURL);
    private FileWriter fw;
     public String jar_path = "javaaddpath('"+System.getProperty("user.dir")+File.separator+"Results.jar');";
   
    
    public DataBaseFrame() {
        setIconImage(icon);
        initComponents();
        listModel = new DefaultListModel();
        this.SqlCmdList.setModel(listModel);
       
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar1 = new javax.swing.JToolBar();
        jLabel1 = new javax.swing.JLabel();
        sqlField = new javax.swing.JTextField();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        jLabel2 = new javax.swing.JLabel();
        octVarField = new javax.swing.JTextField();
        sqlExeButton = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        SqlCmdList = new javax.swing.JList();
        statusPanel1 = new org.domainmath.gui.pacakges.db.StatusPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        connectMenu = new javax.swing.JMenu();
        mysqlDriverItem = new javax.swing.JMenuItem();
        odbcDriverItem = new javax.swing.JMenuItem();
        postgresDriverItem = new javax.swing.JMenuItem();
        sqliteDirverItem = new javax.swing.JMenuItem();
        saveSqlCmdItem = new javax.swing.JMenuItem();
        queryMenu = new javax.swing.JMenu();
        createTableItem = new javax.swing.JMenuItem();
        deleteTableMenuItem = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        exitItem = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        forumItem = new javax.swing.JMenuItem();
        onlineHelpItem = new javax.swing.JMenuItem();
        howToItem = new javax.swing.JMenuItem();
        faqItem = new javax.swing.JMenuItem();
        jSeparator16 = new javax.swing.JPopupMenu.Separator();
        suggestionsItem = new javax.swing.JMenuItem();
        reportBugItem1 = new javax.swing.JMenuItem();
        feedBackItem1 = new javax.swing.JMenuItem();
        jSeparator12 = new javax.swing.JPopupMenu.Separator();
        AboutItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Database Tool");
        setLocationByPlatform(true);
        setMinimumSize(new java.awt.Dimension(700, 400));

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        jLabel1.setText(" SQL Statement  ");
        jToolBar1.add(jLabel1);

        sqlField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sqlFieldActionPerformed(evt);
            }
        });
        jToolBar1.add(sqlField);
        jToolBar1.add(jSeparator2);

        jLabel2.setText(" Octave Variable  ");
        jToolBar1.add(jLabel2);

        octVarField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                octVarFieldActionPerformed(evt);
            }
        });
        jToolBar1.add(octVarField);

        sqlExeButton.setText("  Execute  ");
        sqlExeButton.setFocusable(false);
        sqlExeButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        sqlExeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        sqlExeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sqlExeButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(sqlExeButton);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

        jScrollPane1.setViewportView(SqlCmdList);

        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
        getContentPane().add(statusPanel1, java.awt.BorderLayout.PAGE_END);

        jMenu1.setText("File");

        connectMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/connect.png"))); // NOI18N
        connectMenu.setText("Connect to ...");

        mysqlDriverItem.setText("Mysql Driver");
        mysqlDriverItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mysqlDriverItemActionPerformed(evt);
            }
        });
        connectMenu.add(mysqlDriverItem);

        odbcDriverItem.setText("ODBC Driver");
        odbcDriverItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                odbcDriverItemActionPerformed(evt);
            }
        });
        connectMenu.add(odbcDriverItem);

        postgresDriverItem.setText("Postgres Driver");
        postgresDriverItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                postgresDriverItemActionPerformed(evt);
            }
        });
        connectMenu.add(postgresDriverItem);

        sqliteDirverItem.setText("Sqlite3 Driver");
        sqliteDirverItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sqliteDirverItemActionPerformed(evt);
            }
        });
        connectMenu.add(sqliteDirverItem);

        jMenu1.add(connectMenu);

        saveSqlCmdItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        saveSqlCmdItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/disk.png"))); // NOI18N
        saveSqlCmdItem.setText("Save");
        saveSqlCmdItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveSqlCmdItemActionPerformed(evt);
            }
        });
        jMenu1.add(saveSqlCmdItem);

        queryMenu.setText("Query");

        createTableItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
        createTableItem.setText("Create Table");
        createTableItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                createTableItemActionPerformed(evt);
            }
        });
        queryMenu.add(createTableItem);

        deleteTableMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, 0));
        deleteTableMenuItem.setText("Delete Table");
        deleteTableMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteTableMenuItemActionPerformed(evt);
            }
        });
        queryMenu.add(deleteTableMenuItem);

        jMenu1.add(queryMenu);
        jMenu1.add(jSeparator1);

        exitItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.ALT_MASK));
        exitItem.setText("Exit");
        exitItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitItemActionPerformed(evt);
            }
        });
        jMenu1.add(exitItem);

        jMenuBar1.add(jMenu1);

        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en"); // NOI18N
        helpMenu.setText(bundle.getString("helpMenu.name")); // NOI18N

        forumItem.setText("Forum");
        forumItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forumItemActionPerformed(evt);
            }
        });
        helpMenu.add(forumItem);

        onlineHelpItem.setText("Help and Support");
        onlineHelpItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                onlineHelpItemActionPerformed(evt);
            }
        });
        helpMenu.add(onlineHelpItem);

        howToItem.setText("How to...");
        howToItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                howToItemActionPerformed(evt);
            }
        });
        helpMenu.add(howToItem);

        faqItem.setText("Online FAQ");
        faqItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                faqItemActionPerformed(evt);
            }
        });
        helpMenu.add(faqItem);
        helpMenu.add(jSeparator16);

        suggestionsItem.setText("Suggestions");
        suggestionsItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                suggestionsItemActionPerformed(evt);
            }
        });
        helpMenu.add(suggestionsItem);

        reportBugItem1.setText(bundle.getString("reportBugItem.name")); // NOI18N
        reportBugItem1.setToolTipText(bundle.getString("reportBugItem.tooltip")); // NOI18N
        reportBugItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                reportBugItem1ActionPerformed(evt);
            }
        });
        helpMenu.add(reportBugItem1);

        feedBackItem1.setText(bundle.getString("yourFeedbackItem.name")); // NOI18N
        feedBackItem1.setToolTipText(bundle.getString("yourFeedbackItem.tooltip")); // NOI18N
        feedBackItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                feedBackItem1ActionPerformed(evt);
            }
        });
        helpMenu.add(feedBackItem1);
        helpMenu.add(jSeparator12);

        AboutItem.setText(bundle.getString("aboutItem.name")); // NOI18N
        AboutItem.setToolTipText(bundle.getString("aboutItem.tooltip")); // NOI18N
        AboutItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AboutItemActionPerformed(evt);
            }
        });
        helpMenu.add(AboutItem);

        jMenuBar1.add(helpMenu);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void sqlFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sqlFieldActionPerformed
         String cmd = this.sqlField.getText();
         if(!cmd.equals("")){
            listModel.addElement(this.sqlField.getText()); 
            MainFrame.octavePanel.eval("sql("+Character.toString('"')+cmd+Character.toString('"')+");");
         }else {
            JOptionPane.showMessageDialog(this,"Please type any SQL Statement","DomainMath IDE",JOptionPane.ERROR_MESSAGE);
         }
            
       this.sqlField.setSelectionStart(0);
       this.sqlField.setSelectionEnd(cmd.length());
        MainFrame.octavePanel.evaluate("pkg load java;");
         MainFrame.octavePanel.evaluate(jar_path);
        MainFrame.octavePanel.evaluate("_obResult = javaObject('ResultsFrame',disp("+"sql("+Character.toString('"')+cmd+Character.toString('"')+")"+"));");
    }//GEN-LAST:event_sqlFieldActionPerformed

    private void sql() {
         String cmd = this.sqlField.getText();
        String var_name = this.octVarField.getText();
        if(!cmd.equals("") && !var_name.equals("")) {
            MainFrame.octavePanel.eval(octVarField.getText()+"=sql("+Character.toString('"')+cmd+Character.toString('"')+");");
               MainFrame.octavePanel.evaluate("pkg load java;");
            MainFrame.octavePanel.evaluate(jar_path);
            MainFrame.octavePanel.evaluate("_obResult = javaObject('ResultsFrame',disp("+octVarField.getText()+"));");
       
        }else if(var_name.equals("") && !cmd.equals("")) {         
            MainFrame.octavePanel.eval("sql("+Character.toString('"')+cmd+Character.toString('"')+");");
              MainFrame.octavePanel.evaluate("pkg load java;");
              MainFrame.octavePanel.evaluate(jar_path);
              MainFrame.octavePanel.evaluate("_obResult = javaObject('ResultsFrame',disp("+"sql("+Character.toString('"')+cmd+Character.toString('"')+")"+"));");
  
        }else{
            
            JOptionPane.showMessageDialog(this,"Please type any SQL Statement","DomainMath IDE",JOptionPane.ERROR_MESSAGE);
        }
    }
    private void octVarFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_octVarFieldActionPerformed
       sql();
       this.octVarField.setSelectionStart(0);
       this.octVarField.setSelectionEnd(octVarField.getText().length());
    }//GEN-LAST:event_octVarFieldActionPerformed
public void setPath(String path) {
    try {
            URI uri = new URI(path);
            Desktop desktop=Desktop.getDesktop();
            desktop.browse(uri);
        } catch (URISyntaxException | IOException ex) {
        }
    }
    private void sqlExeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sqlExeButtonActionPerformed
        sql();
    }//GEN-LAST:event_sqlExeButtonActionPerformed

    private void mysqlDriverItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mysqlDriverItemActionPerformed
        MySqlLoginDialog mySqlLoginDialog = new MySqlLoginDialog(this,true);
        mySqlLoginDialog.setLocationRelativeTo(this);
        mySqlLoginDialog.setVisible(true);
    }//GEN-LAST:event_mysqlDriverItemActionPerformed

    private void odbcDriverItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odbcDriverItemActionPerformed
        OdbcLoginDialog odbcLoginDialog = new OdbcLoginDialog(this,true);
        odbcLoginDialog.setLocationRelativeTo(this);
        odbcLoginDialog.setVisible(true);
    }//GEN-LAST:event_odbcDriverItemActionPerformed

    private void postgresDriverItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_postgresDriverItemActionPerformed
        PostgresLoginDialog postgresLoginDialog = new PostgresLoginDialog(this,true);
        postgresLoginDialog.setLocationRelativeTo(this);
        postgresLoginDialog.setVisible(true);
    }//GEN-LAST:event_postgresDriverItemActionPerformed

    private void exitItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitItemActionPerformed
        dispose();
    }//GEN-LAST:event_exitItemActionPerformed

    private void sqliteDirverItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sqliteDirverItemActionPerformed
        fc = new JFileChooser();
        fc.setAcceptAllFileFilterUsed(false);
        fc.setMultiSelectionEnabled(false);
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        fc.setFileFilter(new FileNameExtensionFilter("Sqlite Database (*.db; *.sqlite; *db3)","db","sqlite","db3"));
        
        int returnVal = fc.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
             MainFrame.octavePanel.eval("pkg load database");
             MainFrame.octavePanel.eval("sqlite3");
             MainFrame.octavePanel.eval("default_db(sqlite3_db("+Character.toString('"')+fc.getSelectedFile()+Character.toString('"')+"));");
        }
        
    }//GEN-LAST:event_sqliteDirverItemActionPerformed

    private void forumItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forumItemActionPerformed
        setPath("http://domainmathide.freeforums.org/");
    }//GEN-LAST:event_forumItemActionPerformed

    private void onlineHelpItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onlineHelpItemActionPerformed
        setPath("http://domainmathide.freeforums.org/help-and-support-f5.html");
    }//GEN-LAST:event_onlineHelpItemActionPerformed

    private void howToItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_howToItemActionPerformed
        setPath("http://domainmathide.freeforums.org/how-to-f9.html");
    }//GEN-LAST:event_howToItemActionPerformed

    private void faqItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_faqItemActionPerformed
        setPath("http://domainmathide.freeforums.org/faq-f8.html");
    }//GEN-LAST:event_faqItemActionPerformed

    private void suggestionsItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_suggestionsItemActionPerformed
        setPath("http://domainmathide.freeforums.org/suggestions-f6.html");
    }//GEN-LAST:event_suggestionsItemActionPerformed

    private void reportBugItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reportBugItem1ActionPerformed
        setPath("http://domainmathide.freeforums.org/bugs-f3.html");
    }//GEN-LAST:event_reportBugItem1ActionPerformed

    private void feedBackItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_feedBackItem1ActionPerformed
        setPath("http://domainmathide.freeforums.org/feedback-f4.html");
    }//GEN-LAST:event_feedBackItem1ActionPerformed

    private void AboutItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AboutItemActionPerformed
        AboutDlg aboutDlg = new AboutDlg(this, true);
        aboutDlg.setLocationRelativeTo(this);
        aboutDlg.setVisible(true);
    }//GEN-LAST:event_AboutItemActionPerformed

    private void saveSqlCmdItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveSqlCmdItemActionPerformed
        fc = new JFileChooser();
        fc.setAcceptAllFileFilterUsed(false);
        fc.setMultiSelectionEnabled(false);
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        fc.setFileFilter(new FileNameExtensionFilter("Sql Commands ( *.sql)","sql"));
        
        int returnVal = fc.showSaveDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            try {
                fw = new FileWriter(fc.getSelectedFile()) ;
                for(int i=0; i<this.SqlCmdList.getModel().getSize(); i++) {
                    fw.write(this.SqlCmdList.getModel().getElementAt(i).toString());
                    fw.append("\r\n");
                    
                }
                
                fw.flush();
                fw.close();
                
            } catch (IOException ex) {
                Logger.getLogger(DataBaseFrame.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_saveSqlCmdItemActionPerformed

    private void createTableItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createTableItemActionPerformed
        NewTableDialog newTableDialog = new NewTableDialog(this,true);
        newTableDialog.setLocationRelativeTo(this);
        newTableDialog.setVisible(true);
    }//GEN-LAST:event_createTableItemActionPerformed

    private void deleteTableMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteTableMenuItemActionPerformed
        try{
          String tableNameDelete;
            tableNameDelete = JOptionPane.showInputDialog("Enter Table Name:");
        
            if(!tableNameDelete.equals("")) {
               MainFrame.octavePanel.eval("try");
                MainFrame.octavePanel.eval("sql("+Character.toString('"')+"drop table "+tableNameDelete+Character.toString('"')+";)");
                MainFrame.octavePanel.eval("catch");   
            }
            
        }catch(NullPointerException ex) {
        }
        
        
    }//GEN-LAST:event_deleteTableMenuItemActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
       
         try {
            
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
       } catch(ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
       }

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DataBaseFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem AboutItem;
    private javax.swing.JList SqlCmdList;
    private javax.swing.JMenu connectMenu;
    private javax.swing.JMenuItem createTableItem;
    private javax.swing.JMenuItem deleteTableMenuItem;
    private javax.swing.JMenuItem exitItem;
    private javax.swing.JMenuItem faqItem;
    private javax.swing.JMenuItem feedBackItem1;
    private javax.swing.JMenuItem forumItem;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JMenuItem howToItem;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator12;
    private javax.swing.JPopupMenu.Separator jSeparator16;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JMenuItem mysqlDriverItem;
    private javax.swing.JTextField octVarField;
    private javax.swing.JMenuItem odbcDriverItem;
    private javax.swing.JMenuItem onlineHelpItem;
    private javax.swing.JMenuItem postgresDriverItem;
    private javax.swing.JMenu queryMenu;
    private javax.swing.JMenuItem reportBugItem1;
    private javax.swing.JMenuItem saveSqlCmdItem;
    private javax.swing.JButton sqlExeButton;
    private javax.swing.JTextField sqlField;
    private javax.swing.JMenuItem sqliteDirverItem;
    private org.domainmath.gui.pacakges.db.StatusPanel statusPanel1;
    private javax.swing.JMenuItem suggestionsItem;
    // End of variables declaration//GEN-END:variables
}
